/*
 *   Copyright 2021 zzh
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 *
 */

package com.aduib.boot.common.serialization.model;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * @description: Person2
 * @author: zzh
 * @date: 2021/10/13 13:41
 */
public class Person2 {

    private Person Person = new Person();

    private Long id;

    private List<Person> PersonList;

    private Map<String, Person> PersonMap;

    private Person[] PersonArray;

    public Person getPerson() {
        return Person;
    }

    public void setPerson(Person Person) {
        this.Person = Person;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public List<Person> getPersonList() {
        return PersonList;
    }

    public void setPersonList(List<Person> PersonList) {
        this.PersonList = PersonList;
    }

    public Map<String, Person> getPersonMap() {
        return PersonMap;
    }

    public void setPersonMap(Map<String, Person> PersonMap) {
        this.PersonMap = PersonMap;
    }

    public Person[] getPersonArray() {
        return PersonArray;
    }

    public void setPersonArray(Person[] PersonArray) {
        this.PersonArray = PersonArray;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person2 person2 = (Person2) o;
        return Objects.equals(Person, person2.Person) && Objects.equals(id, person2.id) && Objects.equals(PersonList, person2.PersonList) && Objects.equals(PersonMap, person2.PersonMap) && Arrays.equals(PersonArray, person2.PersonArray);
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(Person, id, PersonList, PersonMap);
        result = 31 * result + Arrays.hashCode(PersonArray);
        return result;
    }
}
